<?php 
 $url_edit_available_time = $this->url(array('module'=>"teacher",'controller'=>"available-time",'action'=>"edit-time"),null,true);
 $url_delete_available_time = $this->url(array('module'=>"teacher",'controller'=>"available-time",'action'=>"delete-avaliable-time"),null,true);
 $url_add_available_time = $this->url(array('module'=>"teacher",'controller'=>"available-time",'action'=>"add-avaliable"),null,true); 
?>
<?php 
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$session_user=new Zend_Session_Namespace('auth');
$request=Zend_Controller_Front::getInstance()->getRequest();
$user_info = new Application_Model_DbTable_DbGetUserInfo();
$result = $user_info->getUserInfo();
?>
<style>
.dataTables_length{ padding:10px 0 0 10px;}
.dataTables_info{ padding:10px 0 0 10px;}
.dataTables_filter{ float: right; padding-right:10px; padding-top:10px;}
.dataTables_paginate,paging_simple_numbers{ float: right; padding-right:10px; padding-top:10px;}
.navbar-right{margin: 4px;}
tr{font-size: 15px;}
td{font-size: 14px;}
</style>
<link href="<?php echo $this->baseUrl()?>/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/sb-admin.css" rel="stylesheet">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
	<a  style="border: 0; margin-top:-12px;" class="navbar-brand" href="<?php echo $this->baseUrl(); ?>/index/dashboad"><img src="<?php echo $this->baseUrl(); ?>/images/logo_download.gif" width="30"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  	<a style="border: 0; margin-top: 12px;" href="<?php echo $this->baseUrl(); ?>/index/dashboad">
		<button class="btn btn-primary" style="border: 0; margin-top: 12px;"><i class="fa fa-backward"></i> &nbsp; Back</button>
	</a>
	<!-- /.navbar-header -->
   <ul class="nav navbar-top-links navbar-right">
      <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">
            <i class="fa fa-user fa-fw"></i> <?php echo ucwords(strtolower($session_user->fullname));?>  <i class="fa fa-caret-down"></i>
          </a>
          <ul class="dropdown-menu dropdown-user">
             <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a></li>
             <li><a href="<?php echo $this->url(array('module'=>'userWu','controller'=>'user','action'=>'view-user', 'id'=>$session_user->user_id));?>"><i class="fa fa-gear fa-fw"></i> Settings</a></li>
             <li class="divider"></li>
             <li><a href="<?php echo $this->url(array('module'=>'','controller'=>'index','action'=>'logout', 'value'=>1));?>"><i class="fa fa-sign-out fa-fw"></i> Logout</a></li>
          </ul>
        <!-- /.dropdown-user -->
     </li>
 <!-- /.dropdown -->
    </ul>
     <!-- /.navbar-top-links -->
</nav>
<form action="<?php //echo $url_subject_list;?>" method="post" id="frm">
    <div id="wrapper">
      <div id="page-wrapper">

        <div class="row"  style=" width:100%; margin:0 auto" >
          <div class="row">
               <div class="col-lg-12">
               	 <div class="panel-heading">    	  
               	  
               	    <a href="<?php echo $url_add_available_time;?>">
               	    <button type="button" class="btn btn-small btn-success">
					<b><i class="fa fa-plus"></i></b> &nbsp;Add New 
					</button>
					</a>
					<button class="btn btn-small btn-warning" name="edit" value="edit">
					<b><i class="fa fa-check-circle-o"></i></b> &nbsp;Edit					 
					</button>
					<button class="btn btn-small btn-danger" name="delete" value="delete">
					<b><i class="fa fa-trash-o"></i></b> &nbsp;Delete					 
					</button> 
					
					
					<table>
							<tr>
								<td>Deparment :</td>
								<td><?php echo $this->forms->getElement("department");?></td>
								<td>Semester :</td>
								<td><?php echo $this->forms->getElement("semester");?></td>
							</tr>
							<tr>
								<td>Academic Year</td>
								<td><?php echo $this->forms->getElement("academic");?></td>
								<td><input type="submit" name="tbn_search" value="Search"  /></td>
								<td><?php //echo $this->frmavaliable->getElement("email");?></td>
							</tr>
							<tr>
								<td></td>
								<td><?php //echo $this->frmavaliable->getElement("tel");?></td>
								<td></td>
								<td><?php //echo $this->frmavaliable->getElement("Save");?></td>
							</tr>
							
					</table>
                  </div>
                  <div>
                  	
                  </div>
                   <div class="panel panel-default">
                        <!-- /.panel-heading -->
                        
                        <div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
						                    <th>Check </th>
						                    <th>No </th>
						                    <th>Teacher Name </th>
						                    <th>Academic Year</th>
						                    <th>Semester </th>
						                    <th>Create Date </th>
						                    <th>Edit </th>
						                    <th>Delete </th>
						                    
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php 
                                    error_reporting(0);
                                    $list_time = $this->listtime
                                    ?>
                                    <?php foreach(@$list_time as $row) {?>
								         <tr>
								         	<td style="padding-left:30px">
                                        	<?php 
                                        		echo "<input type='checkbox' title='".$row["teacher_name"]."' name='chk_modify' value='".$row["avaliable_id"]."' />";
											?>
                                        	</td>
									         <td><?php echo $row["avaliable_id"];?></td>
									         <td><?php echo $row["teacher_name"];?></td>
									         <td><?php echo $row["academic_year"];?></td>
									         <td><?php echo $row["semester_id"];?></td>
									         <td><?php echo $row["created_date"];?></td>
									         <td><a href="<?php echo $url_edit_available_time."/id/".$row["avaliable_id"];?>">Edit</a></td>
									         <td><a href="<?php echo $url_delete_available_time."/id/".$row["avaliable_id"];?>">Delete</a></td>
									         </tr>
								       <?php }?>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
             <!-- /.col-lg-6 -->
        </div><!-- /#page-row -->
      </div><!-- /#page-wrapper -->
	</div>
  </div><!-- /#wrapper -->
</form> 
    <script src="<?php echo $this->baseUrl(); ?>/js/jquery-1.10.2.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/bootstrap.min.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/metisMenu/jquery.metisMenu.js"></script>

    <!-- Page-Level Plugin Scripts - Tables -->
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/dataTables/dataTables.bootstrap.js"></script>

    <!-- SB Admin Scripts - Include with every page -->
    <script src="<?php echo $this->baseUrl(); ?>/js/sb-admin.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
    <script>
    $(document).ready(function() {
        $('#dataTables-example').dataTable();
    });
    //$('#department').chosen();
    </script>